<?php namespace Common\Model;
use Hdphp\Model\Model;
class Attribute extends Model{
	protected $table='attribute';
	protected $validate=array(
		array('aname','required','属性名称不能为空',3,3),
		array('avalue','required','属性值不能为空',3,3)
	);
	public function store(){
		if($this->create()){
				$this->add();
			return TRUE;
		}
		return FALSE;
	}
	public function update(){
		if($this->create()){
			$this->save();
			return TRUE;
		}
		return FALSE;
	}
}
